1. Field of the Invention
The present invention relates to the field of computer graphics and more particularly to the field of displaying objects on the screen of a cathode ray tube.
2. Description of the Prior Art
Computer graphics systems for displaying objects on the screen of a display device required very rapid processing of large amounts of data to enable the displayed object to be moved or the shading of the surface of the object to vary with movement of the object or variations in the location of a source of light that is shining on the object. This need for rapid computation has resulted in reduction of the time required to specify the object to be displayed in terms of the many points or vertices that are organized to form polygons that define the surface of the object.
With the location of such points defined, the next step in displaying the object is to rapidly convert such points into data indicating which picture elements ("pixels") on the screen of a display device must be illuminated or turned ON in order to display the object. This involves the steps of processing pairs of vertices that define an edge to indicate which pixels on the screen must be turned ON to draw the edge between pairs of vertices. Also, because the screen may have hundreds of pixels in each of the x and y coordinate directions (such as 1280 by 1024), the data defining which pixels must be turned ON must be stored in a manner suitable for controlling the video function of the display device. For example, when the display device functions on a scan line by scan line basis as is customary, the manner in which the pixels of the screen are processed for drawing lines and for data storage purposes must be specially related to the scan lines so as to minimize storage requirements without reducing the speed of the scanning operation.
To achieve some of these objectives, in the past the screen of the display device has been divided up into row address blocks that are related to DRAM chips that are selected for storing the pixel ON data. Such row address blocks have been identified with respect to addresses within the DRAM, such as by having a given block for a given row address extend 128 column addresses in the x direction on the screen and two column addresses in the y direction on the screen. To reduce the number of times that a given edge drawn on the screen must be re-addressed into different DRAM row addresses, others have arranged the row address blocks more symmetrically by providing a block for a given row address in DRAM that extends in both the x and y directions 16 column addresses. As a result, unless the edge is horizontal, the edge can extend through more column addresses before a new row of the DRAM must be addressed.
Having reduced the number of times that the DRAM row addresses must be re-addressed as the edge is drawn from row address block to row address block, others have then organized the pixels within a given row address block into groups, such as groups of 64 pixels formed by 8 pixels in the x direction on the screen and 8 pixels in the y direction on the screen. Others have used groups of 20 pixels formed by groups of 5 pixels in the x direction and 4 pixels in the y direction. Such group of pixels has been referred to as a "matrix". Each matrix in a given row address block has a specific DRAM column address.
Such pixel group or matrix has been used in the past to define a unit or group of pixels that are written into the DRAM at the same time. Initially, the determination of which pixel out of the 20 pixels in such matrix will be ON has been performed on a pixel by pixel basis using a number of machine cycles, where one machine cycle occurs for every one clock cycle of a bit slice processor, for example. Once the determination has been completed for all the pixels in the matrix, then the entire matrix, representing the pixels that should be ON and OFF of the group of 20 pixels, is written into the DRAM in one or more additional machine cycles. In this approach, there is no need to determine which matrix the edge will extend into next (the "next matrix") during the computation of the pixels for a particular or "current" matrix. Rather, only when the next "ON" pixel of the next matrix is identified is the next matrix identified. This occurs after the writing of the current matrix into the DRAM. In this prior method, it may be understood that it required 5 machine cycles to identify the 5 pixels that must be turned on in order to have an edge completely cross a given matrix. Thus, at least 5 machine cycles were required to identify such ON pixels and one or more additional cycles to write them into the DRAM. However, there have also been reductions in the number of machine cycles required to identify the ON pixels in such matrix.
Having defined the pixels that must be ON in order to draw the edge between two vertices, the display of surfaces of the object and the removal of hidden edges of the object have involved shading the surfaces and determining the depths of such surfaces relative to each other along a field of view. When the object is displayed in color, the shading is performed for each color component, such as red, blue, and green.
In the past, intensity interpolation shading, referred to as Gouraud shading for its developer, has been used to linearly interpolate vertex intensities along each edge of a polygon. Then, the intensities of pixels along a given scan line that extends between such edges are obtained by linear interpolation from one polygon edge to the other. Certain general purpose computers have been used for shading. However, experience with them indicates that the determination of the intensity per pixel has required more than one machine cycle. In some cases from 3 to 10 machine cycles have been required for each instruction of the shading process, and one or more instructions are required per pixel. As a result of such number of machine cycles required to determine the intensity of each pixel, such computers have not been able to perform shading as fast as the rate at which line drawing systems define the objects to be displayed. With further increases in the available speed for specifying the vertices that define the surface of the object, and with further increases in the speed at which line drawing apparatus operates to define the ON pixels that define a polygon edge, there are increasing requirements for faster ways to shade the surfaces of the object and to define the relative depths of such surfaces.